package request

type AddUser struct {
	Username     string `json:"username" `
	PasswordHash string `json:"password_hash" `
	Name         string `json:"name"`
	Mobile       string `json:"mobile"`
}

// Register User register structure
type Register struct {
	ID       uint   `json:"id" example:"用户id"`
	Username string `json:"userName" example:"用户名"`
	Password string `json:"password" example:"密码"`
	Name     string `json:"name" example:"昵称"`
	Email    string `json:"email" gorm:"comment:用户邮箱"`
	Mobile   string `json:"mobile" gorm:"comment:用户手机号"`
	RoleId   int    `json:"role_id" swaggertype:"string" example:"int 角色id"`
	Status   int    `json:"status" swaggertype:"string" example:"int 是否启用"`
}

// SetUser User SetUser structure
type SetUser struct {
	ID       uint   `json:"id" example:"用户id"`
	Username string `json:"userName" example:"用户名"`
	Name     string `json:"name" example:"昵称"`
	Email    string `json:"email" gorm:"comment:用户邮箱"`
	Mobile   string `json:"mobile" gorm:"comment:用户手机号"`
	RoleId   int    `json:"role_id" swaggertype:"string" example:"int 角色id"`
	Status   int    `json:"status" swaggertype:"string" example:"int 是否启用"`
	RoleIds  []uint `json:"roleIds" swaggertype:"string" example:"[]uint 角色id"`
}

type Login struct {
	Username     string `json:"userName" example:"用户名"`
	PasswordHash string `json:"passwordHash" example:"密码"`
	//Username     string `json:"userName" example:"用户名"`
	//PasswordHash string `json:"passwordHash" example:"密码"`
}

type UpdatePass struct {
	OldPassword  string `json:"oldPassword"  example:"旧密码"`
	PasswordHash string `json:"passwordHash" validate:"required,min=6" example:"密码"`
	RePassword   string `json:"rePassword" validate:"required,min=6" example:"确认密码"`
}

type UserList struct {
	Register
	PageInfo
}
